-
Notifications
You must be signed in to change notification settings - Fork 549
Update client to ES2022 #24324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update client to ES2022 #24324
Conversation
## Description Fix `AuthorizationError.claims` and `AuthorizationError.tenantId` so they don't shadow the actual values from the super constructor that are manually copied onto the `this` object when TypeScript introduces an ES6 class fields by targeting ES 2022. Issue detected by #24324 ## Reviewer Guidance The review process is outlined on [this wiki page](https://github.com/microsoft/FluidFramework/wiki/PR-Guidelines#guidelines). --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR aims to update the client to ES2022 to reduce bundle size and improve debugging of JS private properties. The changes include updating the target in the build configuration to ES2022 while leaving a few package tsconfig settings at ES2021 due to failing tests, and updating the changeset to reflect the new build target.
- The build configuration in common/build/build-common/tsconfig.base.json now targets ES2022.
- Three package tsconfig.json files continue to target ES2021 with comments noting test failures.
- The changeset file documents the updated build target and its benefits.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
experimental/PropertyDDS/packages/property-properties/tsconfig.json | Target remains ES2021 with notes on failing tests. |
experimental/PropertyDDS/packages/property-dds/tsconfig.json | Target remains ES2021 with notes on failing tests. |
experimental/PropertyDDS/packages/property-common/tsconfig.json | Target remains ES2021 with notes on failing tests. |
common/build/build-common/tsconfig.base.json | Updated target to ES2022. |
.changeset/cyan-experts-nail.md | Updates changeset message to document the migration benefits. |
Comments suppressed due to low confidence (3)
experimental/PropertyDDS/packages/property-properties/tsconfig.json:13
- The PR title and description indicate an update to ES2022, yet this tsconfig is still targeting ES2021 due to failing tests. Consider adding a reference to an issue or roadmap note that clarifies the plan for updating this package once the tests are fixed.
"target": "ES2021",
experimental/PropertyDDS/packages/property-dds/tsconfig.json:16
- Although the PR aims to update to ES2022, this configuration remains at ES2021 with a comment about failing tests. Please consider documenting the strategy for addressing these failing tests or linking to a tracking issue.
"target": "ES2021",
experimental/PropertyDDS/packages/property-common/tsconfig.json:9
- This tsconfig file continues to target ES2021 despite the ES2022 migration goal. Please add a comment or a reference to an issue that outlines your plan to update this as soon as the failing tests are resolved.
"target": "ES2021",
Description
Update client to ES2022.
ES2022 saves over 2% (7309 bytes) on bundle size (measured using SharedTree bundles which includes all of the runtime shared tree uses as well).
Also building targeting ES2022 provides a better debug experience for JS private properties by not polyfilling them to weak map lookups.
Note that Fluid Framework has no validation that our dependencies don't already have dependencies on newer things, and no compatibility testing for older or less supported runtimes.
Tracked by AB#34388.
Breaking Changes
See changeset
Reviewer Guidance
The review process is outlined on this wiki page.
This needs special review based on potential impact on customers and our current lack of process for how to handle such updates.